<?php
class PortadaController extends Model3_Controller
{
    public function init()
    {

    }

    
    protected function indexAction()
    {
        $petsAdapter = MN_PetsTable::getInstance();
        $status = '';
        if(count($this->getRequest()->getParams())>0)
        {
            $status = $this->getRequest()->getParam('status');
            $array = array(MN_Pets::STATUS_BOYFRIEND, MN_Pets::STATUS_ADOPTION, MN_Pets::STATUS_SALE);
            if(!in_array($status,$array))
            {
                $status = '';
            }
        }
        
        $pets = $petsAdapter->getPetsByStatus($status);
        $this->view->pets = $pets;
    }


}
